<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>roles表单</title>
<%@ include file="/WEB-INF/jsp/commons/meta.jsp"%>
<script>
	$(document).ready(function() {
		//聚焦第一个输入框
		$("#name").focus();
		//为inputForm注册validate函数
		$("#inputForm").validate({
			rules : {
				name : "required",
				enable : "required",
				resources : "required"
			}
		});
	});
</script>
</head>
<body>
	<div id="container" class="container_24">
		<!-- header -->
		<div id="header">
			<%@ include file="/WEB-INF/jsp/commons/header.jsp"%>
		</div>

		<!-- content -->
		<div id="content" class="container_24">
			<div class=" suffix_5 grid_14 prefix_5">
				<div class="area">
					<form id="inputForm" action="${ctx}/security/roles/save" method="post">
						<input type="hidden" name="id" value="${roles.id}" />
						<table>

							<tr>
								<td>name:</td>
								<td>
									<input id="name" name="name" type="text" value="${roles.name}" size="30" maxlength="80" />
								</td>
							</tr>

							<tr>
								<td>enable:</td>
								<td>
									<input id="enable" name="enable" type="text" value="${roles.enable}" size="30" maxlength="80" />
								</td>
							</tr>

<!-- 							<tr> -->
<!-- 								<td>resources:</td> -->
<!-- 								<td> -->
<!-- 									<select id="resources" name="resources.id"> -->
<%-- 										<c:forEach items="${resourcesList }" var="resources"> --%>
<%-- 											<option <c:if test="${roles.resources.id == resources.id}">selected="selected"</c:if> value="${resources.id }">${resources.name }</option> --%>
<%-- 										</c:forEach> --%>
<!-- 									</select> -->
<!-- 								</td> -->
<!-- 							</tr> -->

							<tr>
								<td colspan="2">
									<input class="submit" type="submit" value="提交" />
									&nbsp;
									<input class="submit" type="button" value="返回" onClick="history.back()" />
								</td>
							</tr>
						</table>
					</form>
				</div>

			</div>
		</div>

		<!-- footer -->
		<div id="footer">
			<%@ include file="/WEB-INF/jsp/commons/footer.jsp"%>
		</div>
	</div>
</body>
</html>
